package com.example.firstdemo.network.repository

import com.example.firstdemo.network.api.user.LoginRequest
import com.example.firstdemo.network.api.user.LoginResponse
import com.example.firstdemo.network.api.user.UserApi

object UserRepository {
    suspend fun login(username: String, password: String): ApiResult<LoginResponse> {
        return withApiErrorHandling {
            UserApi.login(LoginRequest(username, password))
        }
    }
}